// pages/mySpace/mySpace.js
Page({

  data: {
    
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    
  },

  changeInfo: function (e) {
    wx.navigateTo({
      url: './information/information?id=1',
      events: {
        acceptDataFromOpenedPage: function(data) {
          console.log(data)
        },
        someEvent: function(data) {
          console.log(data)
        }
    
      },
      success: function(res) {
        res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
      },
      fail:function (res) { 
        console.log(res)
      }
    })
  },

  aboutUs: function(e) {
    wx.navigateTo({
      url: './about-us/about-us?id=1',
      events: {
        acceptDataFromOpenedPage: function(data) {
          console.log(data)
        },
        someEvent: function(data) {
          console.log(data)
        }
    
      },
      success: function(res) {
        res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
      },
      fail:function (res) { 
        console.log(res)
      }
    })
  }

})